cmake_minimum_required(VERSION 3.30)
project(DataStructHomework)

# 设定 C++11 标准
set(CMAKE_CXX_STANDARD 11)  # 将 C++ 标准设置为 C++11
set(CMAKE_CXX_STANDARD_REQUIRED ON)  # C++11 是强制要求，不会衰退至低版本

# 设定构建运行路径，避免污染根目录
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/.archive)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/.library)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/.runtime)
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/.path)

# 自动查找所有的 .cpp 文件
file(GLOB SOURCES "*.cpp")

# 自动查找所有的 .hpp 文件
file(GLOB HEADERS "*.hpp")

# 添加可执行文件
add_executable(DataStructHomework ${SOURCES} ${HEADERS})

